﻿using Flurl.Http;
using Volo.Abp.DependencyInjection;

namespace CTP.CRM.Application.FlurlRequest
{
    /// <summary>
    /// Flur的http请求
    /// </summary>
    public interface IFlurlRequestService : IScopedDependency
    {
        /// <summary>
        /// 请求第三方http请求:携带Header
        /// </summary>
        /// <param name="url">地址</param>
        /// <param name="timeOutMilliseconds">超时时间：单位为毫秒</param>
        /// <returns></returns>
        public IFlurlRequest RequestHeader(string url, int timeOutMilliseconds = 3000);

        /// <summary>
        /// 请求第三方http请求
        /// </summary>
        /// <param name="url">地址</param>
        /// <param name="timeOutMilliseconds">超时时间：单位为毫秒</param>
        /// <returns></returns>
        public IFlurlRequest RequestBase(string url, int timeOutMilliseconds = 3000);
    }
}
